/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * transfer-view.h : A GtkTreeView that displays the file tranfer status.
 * Copyright (C) 2009 Lingtao Pan
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, 
 * Boston, MA 02111-1307, USA.
 */

#ifndef TRANSFER_VIEW_H
#define TRANSFER_VIEW_H

#include <gtk/gtk.h>

/* G_BEGIN_DECLS */

/* #define GFTP_TYPE_TRANSFER_VIEW         (gftp_transfer_view_get_type ()) */
/* #define GFTP_TRANSFER_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), GFTP_TYPE_TRANSFER_VIEW, GftpTransferView)) */
/* #define GFTP_TRANSFER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GFTP_TYPE_TRANSFER_VIEW, GftpTransferViewClass)) */
/* #define GFTP_IS_TRANSFER_VIEW(obj)      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GFTP_TYPE_TRANSFER_VIEW)) */
/* #define GFTP_IS_TRANSFER_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GFTP_TYPE_TRANSFER_VIEW)) */
/* #define GFTP_TRANSFER_VIEW_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GFTP_TYPE_TRANSFER_VIEW, GftpTransferViewClass)) */

/* typedef struct _GftpTransferView GftpTransferView; */
/* typedef struct _GftpTransferViewClass GftpTransferViewClass; */

/* struct _GftpTransferView { */
/*     GtkTreeView parent; */
    
/* }; */

/* struct _GftpTransferViewClass { */
/*     GtkTreeViewClass parent_class; */
/* }; */

/* void gftp_transfer_view_update (GftpTransferView *tview); */


/* G_END_DECLS */

/*
 * The dlwindow of the interface should belong to the transfer module.
 * It should know the internal structure of the transfer module. 
 * 
 * This makes the programming much more easy.
 */


void transfer_view_setup (GftpInterface *gftp_interface);

/* a timeout callback of main_loop */
int  transfer_view_update_download_status (gpointer data);

void transfer_view_update ();
void transfer_view_update_item_upon_finish (gftp_file *fle);

/* callbacks */
void transfer_stop_cb           (GtkMenuItem *item, gpointer data);
void transfer_resume_cb         (GtkMenuItem *item, gpointer data);
void transfer_clean_all_cb      (GtkMenuItem *item, gpointer data);
void transfer_item_move_up_cb   (GtkMenuItem *item, gpointer data);
void transfer_item_move_down_cb (GtkMenuItem *item, gpointer data);
void transfer_item_delete_cb    (GtkMenuItem *item, gpointer data);


void transfer_view_on_transfer_started ();
void transfer_view_on_transfer_stopped ();

#endif
